package com.sex.bull.melancholy.service.mybatis.service;

import com.sex.bull.melancholy.service.mybatis.bean.OPInfo;
import com.sex.bull.melancholy.service.mybatis.dao.OPInfoDao;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by LiM on 2017/8/24.
 */
@Service
public class OPInfoService {
    @Autowired
    private OPInfoDao opInfoDao;

    /**
     *查询所有
     * @param opInfo
     * @return
     * @throws Exception
     */
    public List<OPInfo> queryAllList(OPInfo opInfo) throws Exception{
        return opInfoDao.queryAllList(opInfo);
    }

    /**
     * 新增数据
     * @param opInfo
     * @throws Exception
     */
    public void addData(OPInfo opInfo) throws Exception{
        opInfoDao.addData(opInfo);
    }

    /**
     * 新增数据
     * @param opInfoList
     * @throws Exception
     */
    public void addData(List<OPInfo> opInfoList) throws Exception {
        opInfoDao.addData(opInfoList);
    }

    /**
     * 更新数据
     * @param opInfo
     * @throws Exception
     */
    public void updateData(OPInfo opInfo) throws Exception{
        opInfoDao.updateData(opInfo);
    }

    /**
     * 逻辑删除数据
     * @param opInfo
     * @throws Exception
     */
    public void deleteData(OPInfo opInfo) throws Exception{
        opInfoDao.deleteData(opInfo);
    }

}
